﻿using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Collections;

namespace ParanoidMike.CacheMyWork
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        private List<EnumeratedProcess> cacheableProcesses = new List<EnumeratedProcess>(); //2010-12-12 reverting back to a Collection datatype to debug the ListBox-has-no-text problem.
        //private StringDictionary cacheableProcesses = new StringDictionary();

        public MainWindow()
        {
            InitializeComponent();
            cacheableProcesses = ProcessesAnalyzer.GetCacheableUserProcessesList(); //2010-12-12 reverting back to a Collection datatype to debug the ListBox-has-no-text problem.
            //cacheableProcesses = ProcessesAnalyzer.GetCacheableUserProcesses();
            AppsList.ItemsSource = cacheableProcesses;
            this.ShowInTaskbar = true; // Debugging support - makes a great place to set a breakpoint
        }

        private void btnOK_Click(object sender, RoutedEventArgs e)
        {

        }

        // Building a CheckedListBox equivalent from scratch http://merill.net/2009/10/wpf-checked-listbox/
        // Step 1: create the checked list items that will be used in the checkedlistbox
        public class CheckedListItem
        {
            public int Id { get; set; }
            public string Name { get; set; }
            public bool IsChecked { get; set; }
        }

        // Step 2: create the List item that will be bound to the ListBox
        public List<CheckedListItem> AvailableCacheableProcesses;


    }
}
